#include<stdio.h>

int main()
{
	int num = 123;
	while (num != 0)
	{
		printf("%d\n", num % 10);
		num = num / 10;

	}


	return 0;


}